#!/usr/bin/php
<?php
if(count($argv) != 2  || in_array('-h', $argv) || in_array('--help', $argv)){
	echo "Create a category in SmugMug\n",
		"Usage: cat-create categoryname\n";
	die();
}

require_once('includes/utility.php');

$category = $argv[1];

$l->heading('Creating Category');
$result = $s->categories_create("Name={$category}");
if(!empty($result['id'])) {
	$l->writeLine("Category Created: {$result['id']}");
} else {
	$l->failed();
}